Optimal. Leaf size=64 \[ \frac {a^2 c (B+i A) \tan ^2(e+f x)}{2 f}+\frac {a^2 A c \tan (e+f x)}{f}+\frac {i a^2 B c \tan ^3(e+f x)}{3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.051, Rules used = {3588, 43} \[ \frac {a^2 c (B+i A) \tan ^2(e+f x)}{2 f}+\frac {a^2 A c \tan (e+f x)}{f}+\frac {i a^2 B c \tan ^3(e+f x)}{3 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 3588
Rubi steps
\begin {align*} \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x)) \, dx &=\frac {(a c) \operatorname {Subst}(\int (a+i a x) (A+B x) \, dx,x,\tan (e+f x))}{f}\\ &=\frac {(a c) \operatorname {Subst}\left (\int \left (a A+a (i A+B) x+i a B x^2\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {a^2 A c \tan (e+f x)}{f}+\frac {a^2 (i A+B) c \tan ^2(e+f x)}{2 f}+\frac {i a^2 B c \tan ^3(e+f x)}{3 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 2.94, size = 109, normalized size = 1.70 \[ \frac {a^2 c \sec (e) \sec ^3(e+f x) (3 (B+i A) \cos (2 e+f x)+3 (B+i A) \cos (f x)-3 A \sin (2 e+f x)+3 A \sin (2 e+3 f x)+6 A \sin (f x)+3 i B \sin (2 e+f x)-i B \sin (2 e+3 f x))}{12 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.09, size = 96, normalized size = 1.50 \[ \frac {{\left (12 i \, A + 12 \, B\right )} a^{2} c e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (18 i \, A + 6 \, B\right )} a^{2} c e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (6 i \, A + 2 \, B\right )} a^{2} c}{3 \, {\left (f e^{\left (6 i \, f x + 6 i \, e\right )} + 3 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 3 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 1.28, size = 127, normalized size = 1.98 \[ \frac {12 i \, A a^{2} c e^{\left (4 i \, f x + 4 i \, e\right )} + 12 \, B a^{2} c e^{\left (4 i \, f x + 4 i \, e\right )} + 18 i \, A a^{2} c e^{\left (2 i \, f x + 2 i \, e\right )} + 6 \, B a^{2} c e^{\left (2 i \, f x + 2 i \, e\right )} + 6 i \, A a^{2} c + 2 \, B a^{2} c}{3 \, {\left (f e^{\left (6 i \, f x + 6 i \, e\right )} + 3 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 3 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 53, normalized size = 0.83 \[ \frac {a^{2} c \left (\frac {i B \left (\tan ^{3}\left (f x +e \right )\right )}{3}+\frac {i A \left (\tan ^{2}\left (f x +e \right )\right )}{2}+\frac {B \left (\tan ^{2}\left (f x +e \right )\right )}{2}+A \tan \left (f x +e \right )\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.68, size = 54, normalized size = 0.84 \[ -\frac {-2 i \, B a^{2} c \tan \left (f x + e\right )^{3} + {\left (-3 i \, A - 3 \, B\right )} a^{2} c \tan \left (f x + e\right )^{2} - 6 \, A a^{2} c \tan \left (f x + e\right )}{6 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.53, size = 50, normalized size = 0.78 \[ \frac {a^2\,c\,\mathrm {tan}\left (e+f\,x\right )\,\left (6\,A+A\,\mathrm {tan}\left (e+f\,x\right )\,3{}\mathrm {i}+3\,B\,\mathrm {tan}\left (e+f\,x\right )+B\,{\mathrm {tan}\left (e+f\,x\right )}^2\,2{}\mathrm {i}\right )}{6\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.45, size = 167, normalized size = 2.61 \[ \frac {6 A a^{2} c - 2 i B a^{2} c + \left (18 A a^{2} c e^{2 i e} - 6 i B a^{2} c e^{2 i e}\right ) e^{2 i f x} + \left (12 A a^{2} c e^{4 i e} - 12 i B a^{2} c e^{4 i e}\right ) e^{4 i f x}}{- 3 i f e^{6 i e} e^{6 i f x} - 9 i f e^{4 i e} e^{4 i f x} - 9 i f e^{2 i e} e^{2 i f x} - 3 i f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________